Skip to content

Restore current SBML test-suite compatibility - #223

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:agent/restore-current-testsuite
Jul 31, 2026
Merged

Restore current SBML test-suite compatibility#223
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:agent/restore-current-testsuite

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 29, 2026

Copy link
Copy Markdown
Member

Ignore this PR until it has been reviewed by @ChrisRackauckas.

Summary

  • allow both the legacy SBMLToolkitTestSuite 0.0.5 stack and the current 1.x stack
  • allow Sundials 6.1+, whose public derivative_discontinuity! support is required by current event tests
  • preserve the original SBML relational operand order when constructing event equations
  • keep event-assigned dynamic parameters irreducible so mtkcompile cannot eliminate callback targets
  • route ODESystemImporter through the existing Catalyst 15/16 conversion helper
  • test the public Catalyst/ModelingToolkit APIs appropriate to each supported major version

Root cause

The exact SBMLToolkitTestSuite = "0.0.5" test compat forced the downstream test job onto ModelingToolkit 9, OrdinaryDiffEq 6, and Sundials 4. It therefore could not resolve with SBMLToolkit's declared ModelingToolkit 10/11 and OrdinaryDiffEq 7 support.

Widening that compat exposed three current-stack issues:

  1. Interpreting a relational trigger before extracting its operands allowed symbolic canonicalization to reverse the event equation orientation.
  2. ModelingToolkit compilation eliminated a nonconstant parameter assigned by an event, leaving the callback without an effective target.
  3. The convenience ODESystemImporter still called the Catalyst conversion API removed in Catalyst 16 / ModelingToolkit 11.

Validation

Run locally with Julia 1.12.6:

  • Current stack: local ModelingToolkit 11.37.0 checkout at 529c98930ee14191a0e90a32e37698ff6dc40309, OrdinaryDiffEq 7.2.0, SBMLToolkitTestSuite 1.1.2, Sundials 6.4.2
    • GROUP=Core Pkg.test("SBMLToolkit"; coverage=true) passed
    • events 3/3, reactions 28/28, rules 11/11, semantic cases 9/9, systems 44/44, utils 11/11, wuschel 2/2
  • Legacy floor: ModelingToolkit 9.84.0, Catalyst 15.0.11, OrdinaryDiffEq 6.107.0, SBMLToolkitTestSuite 0.0.5, Sundials 4.28.0
    • GROUP=Core Pkg.test("SBMLToolkit"; coverage=true) passed
    • events 3/3, reactions 28/28, rules 11/11, semantic cases 9/9, systems 42/42, utils 11/11, wuschel 2/2
  • Runic --check . passed

Local GROUP=QA reached 19/20 checks. Its sole failure was SciMLTesting's new "No unapproved public reexports" check for seven longstanding exports; the identical failure was reproduced on an unmodified main checkout at bb863863eac445a03ef97bb4690550711826f14a.

Hosted CI reached a terminal 10/10 pass: Core passed on Julia LTS, current, and pre-release; QA, documentation, downgrade, Runic, Runic suggestions, spellcheck, and test discovery all passed.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the agent/restore-current-testsuite branch from 70b2e35 to 18eb314 Compare July 29, 2026 12:53
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Rebased onto current main after #224 merged and revalidated at 18eb314e9c15114f029c78f6f6355882ea7aedda.

Local verification on Julia 1.12.6:

  • GROUP=QA julia +1.12 --startup-file=no --project=. -e 'using Pkg; Pkg.test()': QA/qa.jl | 28/28; Testing SBMLToolkit tests passed; exit 0.\n- GROUP=Core julia +1.12 --startup-file=no --project=. -e 'using Pkg; Pkg.test()': events 3/3, reactions 28/28, rules 11/11, simresults 9/9, systems 44/44, utils 11/11, wuschel 2/2; Testing SBMLToolkit tests passed; exit 0.\n- julia +1.12 --project=.runic_env -m Runic --check .: exit 0 (the local Runic environment lives at the workspace root).\n- git diff --check origin/main...HEAD: exit 0.\n\nBefore the history update I fetched both upstream and the fork branch. The remote feature tip was still the previously audited 70b2e35252bd82fb7361667d930e2d28de7e3aad, with no remote-only additions; the push used an explicit force-with-lease for that SHA.

Copy link
Copy Markdown
Member Author

Exact downstream validation against the failing ModelingToolkit workflow is now complete.

Environment:

I ran the same downstream workflow shape from the ModelingToolkit root:

using Pkg
Pkg.Registry.add()
Pkg.develop(PackageSpec(path = "./lib/ModelingToolkitBase"))
Pkg.develop(PackageSpec(path = "."))
Pkg.update()
Pkg.test(; coverage = true)

The unmodified SBMLToolkit main at 7dbc7bca71211d97ba2997b2c38a9f6d69c21827 reproduces the hosted failure locally (exit 1): its exact SBMLToolkitTestSuite = "0.0.5" constraint cannot resolve with the current SciMLBase/OrdinaryDiffEq/Sundials stack.

With this PR stacked, resolution selected SBMLToolkitTestSuite 1.1.2, OrdinaryDiffEq 7.2.0, Sundials 6.4.2, and SciMLBase 3.39.1. The exact workflow then exited 0 with Testing SBMLToolkit tests passed:

  • Core/events.jl: 3/3
  • Core/reactions.jl: 28/28
  • Core/rules.jl: 11/11
  • Core/simresults.jl: 9/9
  • Core/systems.jl: 44/44
  • Core/utils.jl: 11/11
  • Core/wuschel.jl: 2/2
  • total: 108/108

A first-parent compatibility bisect identifies 753fbc269868178401b9227a850203971412b220 (#199) as the first commit advertising the OrdinaryDiffEq 7 / ModelingToolkit 11 ecosystem while still constraining the test suite to the legacy 0.x line. That makes the ModelingToolkit failure pre-existing and independent of its PR. This PR repairs that dependency/test-stack boundary and supplies the source compatibility changes needed for the current stack.

Additional checks on this exact head: Runic --check exited 0, the branch is clean, and it is 0 commits behind current origin/main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants